{extend name="../../admin/view/main"}
{block name="button"}

<!--{if auth('edit')}-->
<a class="layui-btn layui-btn-sm layui-btn-primary" data-modal="{:url('edit')}">新增服务</a>
<!--{/if}-->
{/block}
{block name="content"}
<div class="layui-tab layui-tab-card">

    <div class="layui-tab-content">
        <table class="layui-table margin-top-10" lay-skin="line">
            {notempty name='list'}
            <thead>
            <tr>
                <th class='list-table-check-td think-checkbox'>
                    <label><input data-auto-none data-check-target='.list-check-box' type='checkbox'></label>
                </th>
                <th>服务名称</th>
                <th>服务内容</th>
                <th class='nowrap'>操作</th>
            </tr>
            </thead>
            {/notempty}
            <tbody>
            {foreach $list as $key=>$vo}
            <tr>
                <td class='list-table-check-td think-checkbox'>
                    <label><input class="list-check-box" type='checkbox' value='{$vo.service_id}'></label>
                </td>
                <td class="nowrap relative">
                    <div class="inline-block sub-strong-red">
                        服务名称：<span class="color-text">{$vo.name|default='--'}</span>
                    </div>
                </td>
                <td class="nowrap relative">
                    <div class="inline-block sub-strong-red">
                        服务内容：<span class="color-text">{$vo.summary|default='--'}</span>
                    </div>
                </td>

                <td class="nowrap">
                    {if auth("edit")}
                    <a class="layui-btn layui-btn-sm layui-btn-normal" data-modal="{:url('edit')}?id={$vo.service_id}">编 辑</a>
                    {/if}
                    {if auth("delete")}
                    <a class="layui-btn layui-btn-sm layui-btn-warm" data-action="{:url('delete')}?id={$vo.service_id}">删 除</a>
                    {/if}
                </td>
            </tr>
            {/foreach}
            </tbody>
        </table>
        {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
    </div>
</div>

{/block}
